# -*- coding: utf-8 -*-
"""
Created on Fri Sep 17 21:14:05 2021

@author: Think
"""

matrix=[
[1, 4, 7, 11, 15],
[2, 5, 8, 12, 19],
[3, 6, 9, 16, 22],
[10, 13, 14, 17, 24],
[18, 21, 23, 26, 30]
]
m=len(matrix[0])
n=len(matrix)
target=int(input())
if(target < matrix[0][0] or target > matrix[n-1][m-1]): print('false')
else: 
    for i in range(n):
        if(target>=matrix[i][m-1] and target<=[i][0]): continue
        elif(target in matrix[i]): 
            print('true')
            break
        elif(i==n-1):print('false')
        
"""
主要是先做排除法来提高效率
不在一列数范围里直接跳过循环
"""